home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / network / entrez / client / netentr.h < prev    next >
Text File  |  1996-07-05  |  7KB  |  176 lines

  1. /*   netentr.h
  2. * ===========================================================================
  3. *
  4. *                            PUBLIC DOMAIN NOTICE                          
  5. *               National Center for Biotechnology Information
  6. *                                                                          
  7. *  This software/database is a "United States Government Work" under the   
  8. *  terms of the United States Copyright Act.  It was written as part of    
  9. *  the author's official duties as a United States Government employee and 
  10. *  thus cannot be copyrighted.  This software/database is freely available 
  11. *  to the public for use. The National Library of Medicine and the U.S.    
  12. *  Government have not placed any restriction on its use or reproduction.  
  13. *                                                                          
  14. *  Although all reasonable efforts have been taken to ensure the accuracy  
  15. *  and reliability of the software and data, the NLM and the U.S.          
  16. *  Government do not and cannot warrant the performance or results that    
  17. *  may be obtained by using this software or data. The NLM and the U.S.    
  18. *  Government disclaim all warranties, express or implied, including       
  19. *  warranties of performance, merchantability or fitness for any particular
  20. *  purpose.                                                                
  21. *                                                                          
  22. *  Please cite the author in any work or product based on this material.   
  23. *
  24. * ===========================================================================
  25. *
  26. * File Name:  netentr.h
  27. *
  28. * Author:  Ostell, Kans, Epstein
  29. *
  30. * Version Creation Date:   10/15/91
  31. *
  32. * $Revision: 4.0 $
  33. *
  34. * File Description: 
  35. *       entrez index access library for Entrez network version
  36. *
  37. * Modifications:  
  38. * --------------------------------------------------------------------------
  39. * Date     Name        Description of modification
  40. * -------  ----------  -----------------------------------------------------
  41. * 8-16-94  Brylawski   Added declarations for on-the-fly neighboring,
  42. *                      medline explosion, and mesh tree browsing.
  43. *
  44. * 11-20-94 Brylawski   Modified NetEntDoNeighborText to pass user preferences.
  45. *
  46. * ==========================================================================
  47. *
  48. *
  49. * RCS Modification History:
  50. * $Log: netentr.h,v $
  51.  * Revision 4.0  1995/07/26  13:54:59  ostell
  52.  * force revision to 4.0
  53.  *
  54.  * Revision 1.18  1995/06/29  16:36:46  epstein
  55.  * add biostruc-complexity
  56.  *
  57.  * Revision 1.17  95/05/17  17:53:13  epstein
  58.  * add RCS log revision history
  59.  * 
  60. */
  61.  
  62. #ifndef _NETENTREZ_
  63. #define _NETENTREZ_
  64.  
  65. #ifndef _ENTREZ_
  66. #include <accentr.h>
  67. #endif
  68.  
  69. #define TERM_MAX 80
  70.  
  71. struct termresp {
  72.     CharPtr term;
  73.     Int4    special_count;
  74.     Int4    total_count;
  75. };
  76.  
  77. typedef struct {
  78.     Int4    num_terms;
  79.     Int4    first_page;
  80.     Int4    num_pages_read;
  81.     struct termresp PNTR termresp;
  82. } TermResp, PNTR TermRespPtr;
  83.  
  84. typedef struct {
  85.     DocType   type;
  86.     DocField  field;
  87.     CharPtr   term;
  88. } TermData, PNTR TermDataPtr;
  89.  
  90.  
  91. /**** Initialize and close session *********************/
  92.  
  93. extern Boolean CDECL NetEntrezInit PROTO((CharPtr appl_id, Boolean no_warnings));
  94.  
  95. extern void CDECL NetEntrezFini PROTO((void));
  96.  
  97. extern EntrezInfoPtr NetEntrezGetInfo PROTO((void));
  98. extern CharPtr NetEntrezDetailedInfo PROTO((void));
  99.  
  100. /**** Get Types and Terms ******************************/
  101. /**** prototypes are in netlib.h *********************/
  102.  
  103. /**** Get Links and Neighbors **************************/
  104.  
  105. Int4 NetEntGetMaxLinks PROTO((void));
  106.  
  107. LinkSetPtr CDECL NetUidLinks PROTO((DocType type, DocUid uid, DocType link_to_type));
  108. Int2 CDECL NetLinkUidList PROTO((LinkSetPtr PNTR result, DocType type,
  109. DocType link_to_type, Int2 numuid, DocUidPtr uids, Boolean mark_missing));
  110.  
  111. /**** Get Summaries ************************************/
  112.  
  113. extern Int2 CDECL NetDocSumListGet PROTO((DocSumPtr PNTR result, Int2 numuid, DocType type, DocUidPtr uids, Int2 defer_count));
  114. extern DocSumPtr CDECL NetDocSum PROTO((DocType type, DocUid uid));
  115.  
  116. /**** Get Term List ************************************/
  117.  
  118. extern Int2 CDECL NetTermListByPage PROTO((DocType type, DocField field, Int2 page, Int2 numpage, TermListProc proc));
  119. extern Int2 CDECL NetTermListByTerm PROTO((DocType type, DocField field, CharPtr term, Int2 numterms, TermListProc proc, Int2Ptr first_page));
  120.  
  121. extern Boolean CDECL NetEntrezFindTerm PROTO((DocType type, DocField field, CharPtr term, Int4Ptr spcl, Int4Ptr totl));
  122.  
  123. /**** Creates a term node from the uid parameter ********/
  124. extern void CDECL NetEntrezCreateNamedUidList PROTO((CharPtr term, DocType type, DocField field, Int4 num, DocUidPtr uids));
  125. extern void CDECL NetEntrezCreateNamedUidListX PROTO((CharPtr term, DocType type, DocField field, ByteStorePtr bsp));
  126.  
  127.  
  128. /**** Look up terms with Boolean operations ************/
  129.  
  130. extern ValNodePtr CDECL NetEntTLNew PROTO((DocType type));
  131. extern ValNodePtr CDECL NetEntTLAddTerm PROTO((ValNodePtr elst, CharPtr term, DocType type, DocField field, Boolean special));
  132. extern ValNodePtr CDECL NetEntTLFree PROTO((ValNodePtr elst));
  133. extern LinkSetPtr CDECL NetEntTLEval PROTO((ValNodePtr elst));
  134. extern ByteStorePtr CDECL NetEntTLEvalX PROTO((ValNodePtr elst));
  135. extern Int4 CDECL NetEntTLEvalCount PROTO((ValNodePtr elst));
  136.  
  137. /**** Get the Data **************************************/
  138.  
  139. Int2 CDECL NetEntMedlineEntryListGet PROTO((MedlineEntryPtr PNTR result, Int2 numuid, DocUidPtr uids, Boolean mark_missing));
  140.  
  141. Int2 CDECL NetEntSeqEntryListGet PROTO((SeqEntryPtr PNTR result, Int2 numuid,
  142.         DocUidPtr uids, Int2 retcode, Boolean mark_missing));
  143.  
  144. Int2 CDECL NetEntrezBiostrucListGet PROTO((BiostrucPtr PNTR result, Int4 mdlLvl, Int2 numuid,
  145.                                     DocUidPtr uids, Boolean mark_missing));
  146.  
  147.  
  148. /**** Get a SeqId for a GI ***************************/
  149.  
  150. SeqIdPtr NetSeqIdForGI PROTO((Int4 gi));
  151. Int4 NetEntrezFindSeqId PROTO((SeqIdPtr sip));
  152. EntrezHierarchyPtr NetEntMeshHierarchyGet PROTO((CharPtr term));
  153.  
  154. /**** Neighbor some text on-the-fly ! ************/
  155. LinkSetPtr CDECL NetEntDoNeighborText PROTO((EntrezNeighborTextPtr entp));
  156. Boolean CDECL NetEntCanNeighborText PROTO((void));
  157.  
  158. /**** BLAST a sequence on-the-fly ! ************/
  159. Boolean CDECL NetEntCanBlast PROTO((void));
  160. LinkSetPtr LIBCALL NetEntBlastBioseq PROTO((BioseqPtr bsp, DocType db, CharPtr program, CharPtr database, CharPtr options, Boolean usemonitor));
  161.  
  162.  
  163.  
  164. Boolean CDECL NetEntExpandedMedlineFeatures PROTO((void));
  165.  
  166. /* # of retries to get a server */
  167. #define ENT_SERV_RETRIES 2
  168.  
  169.  
  170. #ifndef _NETROMLIB_
  171. #include <netlib.h>
  172. #endif
  173.  
  174. #endif
  175.  
  176.